package com.huaweicloud.persistent.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.huaweicloud.common.Contants;
import com.huaweicloud.persistent.entity.CoCompany;
import com.huaweicloud.persistent.entity.CoCompanyUser;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * Mapper类
 */
@Mapper
public interface CoCompanyUserMapper extends BaseMapper<CoCompanyUser> {

    @Insert("<script> insert into `${companyUser.schemeName}`.`co_company_user`(user_id,user_name,password,mobile,update_time,create_time,company_id)" +
            " values(#{companyUser.userId},#{companyUser.userName},#{companyUser.password},#{companyUser.mobile}," +
            "now(),now(),#{companyUser.companyId}) </script>")
    void createCompanyUser(@Param("companyUser") CoCompanyUser companyUser);
}
